<?php



namespace App\Http\Requests\Company;

use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;

class QuestionDailyRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'daily_date' => 'required|max:120',
            'ids' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'ids.required' => __('请输入考题的ids'),
            'daily_date.required' => __('请输入考题的日期'),

        ];
    }

    public function filldata()
    {

        $user = Auth::user();
        return [
            'daily_date'=>$this->input('daily_date'),
            'question_ids'=>(array)$this->input('ids',[]),
            'company_id'=>$user['login_company_id'],


        ];
    }
}
